#ifndef VSMESHNODE_H
#define VSMESHNODE_H
#include "VSNode.h"
#include "VSResource.h"
namespace VSEngine2
{
	class VSGeometryNode;
	class VSSwitchNode;
	class VSStream;
	class VSGRAPHIC_API VSMeshNode : public VSNode,public VSResource
	{
		//PRIORITY
		
		//RTTI
		DECLARE_RTTI;
		DECLARE_INITIAL
	public:

		VSMeshNode();
		virtual ~VSMeshNode();
		virtual unsigned int GetResourceType()const
		{
			return RT_MAX;
		}
		inline void SetIsDrawBoundVolume(bool bIsDrawBoundVolume)
		{
			m_bIsDrawBoundVolume = bIsDrawBoundVolume;
		}
		inline unsigned int GetRenderGroup()const
		{
			return m_uiRenderGroup;
		}
		inline void SetRenderGroup(unsigned int uiRenderGroup)
		{
			m_uiRenderGroup = uiRenderGroup;
		}

		virtual void UpDateView(VSCuller & Culler,double dAppTime);

		virtual unsigned int DiskUse()const;

		virtual bool Save(VSStream & rStream,unsigned int &iSaveUse)const;
		virtual bool Load(VSStream & rStream,unsigned int &iSaveUse);
	public:
		virtual bool Clone(const VSObject *pObject,unsigned int uiType);

	protected:
		bool m_bIsDrawBoundVolume;
		unsigned int m_uiRenderGroup;
	};
	DECLARE_Ptr(VSMeshNode);
	VSTYPE_MARCO(VSMeshNode);
}
#endif